<?php
function connectDB()
{
    $file = file_get_contents("config.json");
    $info = json_decode($file,true);
    $conn = (new mysqli($info['host'], $info['username'], $info['password'], $info['database'], $info['port']));
    $conn->set_charset("utf8");
    return $conn;
}

function connect() {
    $file = file_get_contents("config.json");
    $info = json_decode($file,true);
    $conn = (new mysqli($info['host'].":".$info['port'], $info['username'], $info['password']));
    $conn->set_charset("utf8");
    return $conn;
}